using Microsoft.AspNetCore.Mvc;
using Zhaoxi.Zhihu.HttpApi.Infrastructure;
using Zhaoxi.Zhihu.SharedKerel.Paging;
using Zhaoxi.Zhihu.UseCases.Answers.Command;

[Route("api/question/{questionId: int}/answer")]
public class AnswerController : ApiControllerBase
{
    /*[HttpPost]
    public async Task<IActionResult> Create(int questionId, CreateAnswerCommand request)
    {
        var result = await Sender.Send(new CreateAnswerCommand(questionId, request.Content));
        return ReturnResult(result);
    }

    [HttpDelete("{answerId:int}")]
    public async Task<IActionResult> Delete(int questionId, int answerId)
    {
        var result = await Sender.Send(new DeleteAnswerComnand(questionId, answerId));
        return ReturnResult(result);
    }

    [HttpPut("{answerId: int}")]
    public async Task<IActionResult> Update(int questionId, int answerId, UpdateAnswerCommand request)
    {
        var result = await Sender.Send(new UpdateAnswerCommand(questionId, answerId, request.Content));
        return ReturnResult(result);
    }

    [HttpGet("List")]
    public async Task<IActionResult> GetList(int questionId, [FromQuery] Pagination pagination)
    {
        var result = await Sender.Send(new GetAnswerjsQuery(questionId, pagination));
        return ReturnResult(result);
    }*/
}